<template>
	<view>
		<text>easyCom 组件按照规定写不用导包</text>
		<button @click="onBtnClick">按钮组件</button>
		<view :class="['a', types]">看我的类名是父组件的属性{{ types }}</view>
		<slot></slot>
		<slot name="footer"></slot>
	</view>
</template>

<script>
export default {
	name: 'ka-button',
	props: {
		types: {
			default: 'type_attr',
			type: String
		}
	},
	emits: ['onBtnClick'],
	data() {
		return {};
	},

	methods: {
		onBtnClick() {
			console.log('子组件事件触发');
			this.$emit('onBtnClick', 'payload');
		}
	}
};
</script>

<style lang="scss"></style>
